int maxAdjacentDistance(int* nums, int numsSize)
{
    int rel = 0;
    for (int i = 0; i < numsSize - 1; i++)
    {
        int tmp = abs(nums[i] - nums[i + 1]);
        if (tmp > rel)
            rel = tmp;
    }
    if (abs(nums[numsSize - 1] - nums[0]) > rel)
        rel = abs(nums[numsSize - 1] - nums[0]);
    return rel;
}